package com.jsoft.jsofted.platform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.annotation.BindField;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsNotNull;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.jsoft.jsofted.framework.entity.SortEntity;
import com.jsoft.jsofted.framework.entity.TimeEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Id;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * 不存在数据库的字段，标注：@TableField(exist = false)
 * 如：securityCategory1Name、securityCategory2Name、deptName
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Table("sys_project")
@TableName("sys_project")
public class ProjectInfoEntity implements TimeEntity, SortEntity {
    @Id
    @Column
    @TableId(type = IdType.ASSIGN_ID)
    protected Long id;

    @Column(length = 64)
    @IsNotNull
    protected String customerName;

    @Column(length = 128)
    @IsNotNull
    protected String customerRegAddress;

    @Column(length = 64)
    @IsNotNull
    protected String projName;

    @Column(length = 128)
    @IsNotNull
    protected String projAddressName;

    @Column
    @IsNotNull
    protected Timestamp setupTime;

    @Column(length = 4)
    @IsNotNull
    protected String needAudit;

    @Column(length = 8)
    @IsNotNull
    protected String securityCategory1;

    ///////////////////////////securityCategory1的名字，实际数据库表不存在/////////////////////////////////////
    @TableField(exist = false)
    protected String securityCategory1Name;

    @Column(length = 8)
    @IsNotNull
    protected String securityCategory2;

    ///////////////////////////securityCategory2的名字，实际数据库表不存在/////////////////////////////////////
    @TableField(exist = false)
    protected String securityCategory2Name;

    @Column(length = 512)
    @IsNotNull
    protected String serviceRange;

    @Column(length = 20)
    @IsNotNull
    protected Long deptId;

    ///////////////////////////deptId的名字，实际数据库表不存在/////////////////////////////////////
    @TableField(exist = false)
    protected String deptIdName;

    @Column(length = 4)
    @IsNotNull
    protected String securityAwareStatus;

    @Column(length = 4)
    @IsNotNull
    protected String securityMngStatus;

    @Column(length = 20, decimalLength = 2)
    @IsNotNull
    protected BigDecimal intendAmount;

    @Column(length = 20, decimalLength = 2)
    @IsNotNull
    protected BigDecimal psAmount;

    @Column(length = 20, decimalLength = 2)
    @IsNotNull
    protected BigDecimal firstPayAmount;

    @Column(length = 4)
    @IsNotNull
    protected String coopTimes;

    @Column(length = 20, decimalLength = 2)
    @IsNotNull
    protected BigDecimal investAmount;

    @Column(length = 20, decimalLength = 2)
    @IsNotNull
    protected BigDecimal loanAmount;

    @Column(length = 4)
    @IsNotNull
    protected String gainStatus;

    @Column(length = 4)
    @IsNotNull
    protected String creditStatus;

    @Column(length = 512)
    @IsNotNull
    protected String prospect;

    @Column
    @IsNotNull
    protected Timestamp enterTime;

    @Column
    @IsNotNull
    protected Timestamp finishTime;

    @Column
    @IsNotNull
    protected Timestamp sdTime;

    @Column(length = 512)
    @IsNotNull
    protected String otherRequire;

    @Column(length = 4)
    @IsNotNull
    protected String reportReview;

    @Column(length = 4)
    @IsNotNull
    protected String reportMngUnit;

    ///////////////////////////////每张表的公共字段/////////////////////
    @Column
    @IsNotNull
    protected Timestamp createTime;

    @Column
    @IsNotNull
    protected Timestamp updateTime;

    @Column(length = 20, decimalLength = 6)
    @IsNotNull
    protected BigDecimal sortValue;
}
